package com.imti.mall.sale.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.imti.mall.model.sms.pojo.SmsFlashPromotionLog;
import com.imti.mall.sale.dao.SmsFlashPromotionLogDao;
import com.imti.mall.sale.service.SmsFlashPromotionLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SmsFlashPromotionLogServiceImpl extends ServiceImpl<SmsFlashPromotionLogDao, SmsFlashPromotionLog> implements SmsFlashPromotionLogService {

    @Autowired
    SmsFlashPromotionLogDao smsFlashPromotionLogDao;
    /**
     * 查询限时购通知记录表(可根据条件查询)
     * @param smsFlashPromotionLog
     * @return
     */
    @Override
    public List<SmsFlashPromotionLog> findSmsFlashPromotionLog(SmsFlashPromotionLog smsFlashPromotionLog) {
        return smsFlashPromotionLogDao.findSmsFlashPromotionLog(smsFlashPromotionLog);
    }
    /**
     * 添加限时购通知记录表
     * @param smsFlashPromotionLog
     * @return
     */
    @Override
    public Integer addSmsFlashPromotionLog(SmsFlashPromotionLog smsFlashPromotionLog) {
        return smsFlashPromotionLogDao.insert(smsFlashPromotionLog);
    }
    /**
     * 根据id删除限时购通知记录表
     * @param smsFlashPromotionLog
     * @return
     */
    @Override
    public Integer delSmsFlashPromotionLog(SmsFlashPromotionLog smsFlashPromotionLog) {
        return smsFlashPromotionLogDao.deleteById(smsFlashPromotionLog);
    }
}
